<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;

/* @var $this yii\web\View */
/* @var $model backend\modules\admin\models\admin */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="row">

    <div class="col-xs-12">

        <div class="card">

           <div class="header"></div>

           <div class="content">
<?php
$label_class=['class'=>'col-sm-3 control-label no-padding-right'];
$form = ActiveForm::begin(
    [
        'fieldConfig'=>[
            'options' => ['enctype' => 'multipart/form-data', 'class' => 'form-horizontal'],
            'template'=> "<div class=\"form-group\">{label}\n<div class=\"col-sm-3\">{input}</div><div class=\"col-sm-3\">{error}</div></div>",
            'labelOptions' =>['class' => $label_class],
        ],
        'method' => 'post',        
    ]
);
?>
<div class="form-horizontal field-menu-parentid has-success" enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1" > 上级菜单 </label>
    <div class="col-sm-9">
    <select class="col-xs-10 col-sm-5" style="width:400px" name="Menu[parentid]" id="form-field-8">
    <option value="0">作为一级菜单</option>
    <?= $menustr?>
    </select>
    </div>
</div>
</div>
<?= $form->field($model, 'name')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?= $form->field($model, 'cname')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?= $form->field($model, 'm')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?= $form->field($model, 'c')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?= $form->field($model, 'a')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?= $form->field($model, 'data')->textInput(['maxlength' => 20,'class'=>'form-control border-input']) ?>
<?php $model->display = '1'; ?>
<?= $form->field($model, 'display')->radioList([1=>'是',0=>'否'])?>

<div class="clearfix">
    <div class="col-md-offset-3 col-md-9">
        <?= Html::submitButton('提交', ['class'=>'btn btn-info','name' =>'submit-button']) ?>
        <?= Html::resetButton('重置', ['class'=>'btn btn-primary','name' =>'reset-button']) ?>
    </div>
</div>



<?php ActiveForm::end(); ?>

     </div><!-- /.content -->
            
        </div><!-- /.card -->
    </div><!-- /.col -->

</div><!-- /.row -->
